package com.example.javasample.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;

/**
 * 评论
 *
 * @author Kylin
 */
@Schema(name = "评论", description = "评论对象")
@TableName("comment")
@Data
@EqualsAndHashCode(callSuper = true)
public class CommentDO  extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "评论ID")
    private Long id;

    @Schema(description = "评论内容")
    private String content;

    @Schema(description = "博文ID")
    private Long postId;

    @Schema(description = "作者ID")
    private Long authorId;

    @Schema(description = "作者")
    @TableField(exist = false)
    private UserDO author;

}
